import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    carnum:[],
    carvalue:[],
    carparams:{}
  },
  mutations: {
    setnum(state,step){
      state.carnum.push(step)
      window.localStorage.setItem('cargoodsid',state.carnum);
    },
    getgoods(state,obj){
      state.carparams=obj;
      state.carvalue.push(state.carparams);
      const js=JSON.stringify(state.carvalue)
      window.localStorage.setItem('carobj',js);
    }
  },
  actions: {
  },
  modules: {
  }
})
